/*
 * Created on 2005-5-29
 */
package com.yl.cap.analyst.report.service;

import java.io.IOException;
import java.util.Date;
import java.util.List;
import java.util.Map;

import com.yl.cap.analyst.report.domain.Report;

/**
 * @author ZhangQi
 *  
 */
public interface ReportService
{
    /**
     * get all new report
     * @return @throws
     *         Exception
     */
    public List getNewReport(String groupId) throws Exception;

    /**
     * update a report
     * @param newReport
     */
    public void updReport(Report newReport,Map removeMap,Map addMap);
    /**
     * del a report
     * @param id
     */
    public void delReport(String reportRoot,String id);
    /**
     * get a set of level from a report
     * @param reportName
     * @return
     */
    public List getReportLevelInFile(String reportFile) throws IOException;
    /**
     * gen a report file
     * @param reportName
     * @param rootPath
     */
    public void genReport(Report report,String reportName,String rootPath) throws Exception;  
    /**
     * get all report
     * @return
     */
    public List getAllReport();
    
    public List getManagerAvailablyReport(String roleId);
    
    public List getAvailablyReport(String accountId);
    /**
     * get a report
     * @param id
     * @return
     */
    public Report getReport(String id);
    /**
     * get a report file for view
     * @param accountId
     * @param reportId
     * @return
     */
    public String getReportFile(String accountId,String reportId);
    /**
     * can see this report
     * @param accountId
     * @param code
     * @return
     */
    //public boolean hasReport(String accountId,String code);
    /**
     * stop a report
     * @param id
     */
    public void stopReport(String id);
    /**
     * find report by name
     * @param name
     * @return
     */
    public List findReportByName(String name);
    /**
     * find report by date
     * @param date
     * @return
     */
    public List findReportByDate(Date date);
    /**
     * find all report type
     * @return
     */
    public List findAllReportType();
    /*
     * send a email to report's users
     */
    public boolean sendReportEmail(String reportId);
    /*
     * get account's code set
     */
    public List getCodeList(String accountId);
}